<br />
<div>

  <span class="prepage">
    <a href="?p=1">首页</a>
    <a title="上一页" href="?p=<%= page-1 %>">上一页</a>
  </span>
  <span class="prepage">
  <% for(var k=0;k<Math.ceil(total/10);k++) {%>
    <% if(k+1==page){ %>
    <a style="color: white;background-color: red;" href="?p=<%= k+1 %>"><%= k+1 %></a>
    <% } else{ %>
    <a href="?p=<%= k+1 %>"><%= k+1 %></a>
    <% } %>
  <% } %>
  </span>
  <span class="prepage">
    <% if(!isLastPage){ %>
    <a title="下一页" href="?p=<%= page+1 %>">下一页</a>
    <% } else { %>
    <a title="下一页" href="">下一页</a>
    <% } %>
    <a href="?p=<%= Math.ceil(total/10) %>">尾页</a>
  </span>

</div>
